Integrand size = 19, antiderivative size = 109 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {b^2}{a \left (a^2-b^2\right ) d (b+a \cos (c+d x))}+\frac {\log (1-\cos (c+d x))}{2 (a+b)^2 d}-\frac {\log (1+\cos (c+d x))}{2 (a-b)^2 d}+\frac {2 a b \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^2 d} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.211, Rules used = {3957, 2916, 12, 1643} \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {b^2}{a d \left (a^2-b^2\right ) (a \cos (c+d x)+b)}+\frac {2 a b \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )^2}+\frac {\log (1-\cos (c+d x))}{2 d (a+b)^2}-\frac {\log (\cos (c+d x)+1)}{2 d (a-b)^2} \]
[In]
[Out]
Rule 12
Rule 1643
Rule 2916
Rule 3957
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cos (c+d x) \cot (c+d x)}{(-b-a \cos (c+d x))^2} \, dx \\ & = \frac {a \text {Subst}\left (\int \frac {x^2}{a^2 (-b+x)^2 \left (a^2-x^2\right )} \, dx,x,-a \cos (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \frac {x^2}{(-b+x)^2 \left (a^2-x^2\right )} \, dx,x,-a \cos (c+d x)\right )}{a d} \\ & = \frac {\text {Subst}\left (\int \left (\frac {a}{2 (a-b)^2 (a-x)}+\frac {b^2}{(a-b) (a+b) (b-x)^2}-\frac {2 a^2 b}{(a-b)^2 (a+b)^2 (b-x)}+\frac {a}{2 (a+b)^2 (a+x)}\right ) \, dx,x,-a \cos (c+d x)\right )}{a d} \\ & = \frac {b^2}{a \left (a^2-b^2\right ) d (b+a \cos (c+d x))}+\frac {\log (1-\cos (c+d x))}{2 (a+b)^2 d}-\frac {\log (1+\cos (c+d x))}{2 (a-b)^2 d}+\frac {2 a b \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^2 d} \\ \end{align*}
Time = 0.55 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.51 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {-a^2 \cos (c+d x) \left ((a+b)^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-2 a b \log (b+a \cos (c+d x))-(a-b)^2 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+b \left (-a (a+b)^2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+2 a^2 b \log (b+a \cos (c+d x))+(a-b) \left (b (a+b)+a (a-b) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right )}{a (a-b)^2 (a+b)^2 d (b+a \cos (c+d x))} \]
[In]
[Out]
Time = 0.73 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.90
method | result | size |
derivativedivides | \(\frac {-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{2}}+\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{2}}+\frac {b^{2}}{\left (a +b \right ) \left (a -b \right ) a \left (b +a \cos \left (d x +c \right )\right )}+\frac {2 a b \ln \left (b +a \cos \left (d x +c \right )\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2}}}{d}\) | \(98\) |
default | \(\frac {-\frac {\ln \left (\cos \left (d x +c \right )+1\right )}{2 \left (a -b \right )^{2}}+\frac {\ln \left (\cos \left (d x +c \right )-1\right )}{2 \left (a +b \right )^{2}}+\frac {b^{2}}{\left (a +b \right ) \left (a -b \right ) a \left (b +a \cos \left (d x +c \right )\right )}+\frac {2 a b \ln \left (b +a \cos \left (d x +c \right )\right )}{\left (a +b \right )^{2} \left (a -b \right )^{2}}}{d}\) | \(98\) |
parallelrisch | \(\frac {\left (2 a^{2} b \cos \left (d x +c \right )+2 a \,b^{2}\right ) \ln \left (-2 a +\sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (a -b \right )\right )+\left (a -b \right )^{2} \left (b +a \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+b^{2} \left (\cos \left (d x +c \right )+1\right ) \left (a +b \right )}{d \left (a -b \right )^{2} \left (a +b \right )^{2} \left (b +a \cos \left (d x +c \right )\right )}\) | \(115\) |
norman | \(-\frac {2 b^{2}}{d \left (a^{3}-a^{2} b -a \,b^{2}+b^{3}\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \left (a^{2}+2 a b +b^{2}\right )}+\frac {2 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}\) | \(153\) |
risch | \(\frac {i x}{a^{2}-2 a b +b^{2}}+\frac {i c}{d \left (a^{2}-2 a b +b^{2}\right )}-\frac {i x}{a^{2}+2 a b +b^{2}}-\frac {i c}{d \left (a^{2}+2 a b +b^{2}\right )}-\frac {4 i a b x}{a^{4}-2 a^{2} b^{2}+b^{4}}-\frac {4 i a b c}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}-\frac {2 b^{2} {\mathrm e}^{i \left (d x +c \right )}}{a d \left (-a^{2}+b^{2}\right ) \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{i \left (d x +c \right )}+a \right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \left (a^{2}-2 a b +b^{2}\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \left (a^{2}+2 a b +b^{2}\right )}+\frac {2 a b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 b \,{\mathrm e}^{i \left (d x +c \right )}}{a}+1\right )}{d \left (a^{4}-2 a^{2} b^{2}+b^{4}\right )}\) | \(293\) |
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.93 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {2 \, a^{2} b^{2} - 2 \, b^{4} + 4 \, {\left (a^{3} b \cos \left (d x + c\right ) + a^{2} b^{2}\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) - {\left (a^{3} b + 2 \, a^{2} b^{2} + a b^{3} + {\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + {\left (a^{3} b - 2 \, a^{2} b^{2} + a b^{3} + {\left (a^{4} - 2 \, a^{3} b + a^{2} b^{2}\right )} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{2 \, {\left ({\left (a^{6} - 2 \, a^{4} b^{2} + a^{2} b^{4}\right )} d \cos \left (d x + c\right ) + {\left (a^{5} b - 2 \, a^{3} b^{3} + a b^{5}\right )} d\right )}} \]
[In]
[Out]
\[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\int \frac {\csc {\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{2}}\, dx \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.13 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\frac {4 \, a b \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac {2 \, b^{2}}{a^{3} b - a b^{3} + {\left (a^{4} - a^{2} b^{2}\right )} \cos \left (d x + c\right )} - \frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2} - 2 \, a b + b^{2}} + \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2} + 2 \, a b + b^{2}}}{2 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 213 vs. \(2 (105) = 210\).
Time = 0.33 (sec) , antiderivative size = 213, normalized size of antiderivative = 1.95 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\frac {4 \, a b \log \left ({\left | -a - b - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{4} - 2 \, a^{2} b^{2} + b^{4}} + \frac {\log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2} + 2 \, a b + b^{2}} - \frac {4 \, {\left (a b + b^{2} + \frac {a b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}}{{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} {\left (a + b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}}}{2 \, d} \]
[In]
[Out]
Time = 13.78 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.94 \[ \int \frac {\csc (c+d x)}{(a+b \sec (c+d x))^2} \, dx=\frac {\ln \left (\cos \left (c+d\,x\right )-1\right )}{2\,d\,{\left (a+b\right )}^2}-\frac {\ln \left (\cos \left (c+d\,x\right )+1\right )}{2\,d\,{\left (a-b\right )}^2}+\frac {b^2}{a\,d\,\left (a^2-b^2\right )\,\left (b+a\,\cos \left (c+d\,x\right )\right )}+\frac {2\,a\,b\,\ln \left (b+a\,\cos \left (c+d\,x\right )\right )}{d\,{\left (a^2-b^2\right )}^2} \]
[In]
[Out]